package com.yourcompany.api.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yourcompany.api.dto.ChargingOrderCreateDTO;
import com.yourcompany.api.dto.OrderQueryDTO;
import com.yourcompany.api.entity.ChargingOrder;
import com.yourcompany.api.vo.PaymentVO;

public interface ChargingOrderService extends IService<ChargingOrder> {
    
    /**
     * 创建充电订单
     */
    ChargingOrder createChargingOrder(ChargingOrderCreateDTO createDTO);
    
    /**
     * 处理支付成功
     */
    void handlePaySuccess(Long orderId);
    
    /**
     * 开始充电
     */
    void startCharging(String orderNo);
    
    /**
     * 结束充电
     */
    void endCharging(String orderNo);
    
    /**
     * 取消订单
     */
    void cancelOrder(String orderNo);
    
    /**
     * 支付订单
     */
    PaymentVO payOrder(String orderNo, String paymentMethod);
    
    /**
     * 查询支付状态
     */
    boolean queryPayment(String orderNo);
    
    /**
     * 分页查询订单列表
     */
    IPage<ChargingOrder> pageOrders(IPage<ChargingOrder> page, OrderQueryDTO queryDTO);
} 